{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "cf9a11e5",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "a0df4344",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "农化制品   881263\n",
      "能源金属   881267\n",
      "汽车服务及其他   881128\n",
      "汽车零部件   881126\n",
      "汽车整车   881125\n",
      "其他电源设备   881282\n",
      "其他电子   881123\n",
      "其他社会服务   881179\n",
      "软件开发   881272\n",
      "燃气   881146\n",
      "塑料制品   881265\n",
      "食品加工制造   881134\n",
      "生物制品   881142\n",
      "石油加工贸易   881180\n",
      "通信服务   881162\n",
      "通信设备   881129\n",
      "通用设备   881117\n",
      "文化传媒   881164\n",
      "物流   881152\n",
      "消费电子   881124\n",
      "小家电   881173\n",
      "小金属   881170\n",
      "橡胶制品   881266\n",
      "元件   881270\n",
      "医疗服务   881175\n",
      "\n"
     ]
    }
   ],
   "source": [
    "import akshare as ak\n",
    "\n",
    "df0 = ak.stock_board_industry_name_ths()\n",
    "# print(df0[df0['code'].str.contains('综合')])\n",
    "# print(df0[df0['name'].str.contains('综合')])\n",
    "str = ''\n",
    "# for i in range(75, 90):\n",
    "# for i in range(0, 25):\n",
    "# for i in range(25, 50):\n",
    "for i in range(50, 75):\n",
    "# for i in range(75, 90):\n",
    "  str += df0[df0['name'].str.contains('')]['name'][i] + '   ' +  df0[df0['code'].str.contains('')]['code'][i] + '\\n'\n",
    "  # print(df0[df0['name'].str.contains('')]['name'][i])\n",
    "\n",
    "print(str)\n",
    "# stock_board_industry_index_ths_df = ak.stock_board_industry_index_ths(symbol=\"白色家电\", start_date=\"20240101\", end_date=\"20240718\")\n",
    "# print(stock_board_industry_index_ths_df)\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
